package com.tiantian.lianhui.sdk.demo;

import com.tiantian.lianhui.sdk.ShortLinkClient;
import com.tiantian.lianhui.sdk.request.ShortLinkRequest;
import com.tiantian.lianhui.sdk.response.ShortLinkResponse;

/**
 * @author tiantian
 */
public class CreateShortLineDemo {
    public static void main(String[] args) {
        ShortLinkRequest shortLinkRequest = ShortLinkRequest.builder()
                .ak("uphjfgpSsdfgZDFHGfgsDTewrtt94856")
                .gid("默认分组")
                .originUrl("https://gitee.com/tiantian17/lianhui-cloud")
                .build();
        ShortLinkResponse shortLink = ShortLinkClient.createShortLink(shortLinkRequest);
        System.out.println("shortLink.getCode() = " + shortLink.getCode());
        System.out.println("shortLink.getUrl() = " + shortLink.getUrl());
        System.out.println("shortLink.getErrorMsg() = " + shortLink.getErrorMsg());
    }
}
